<?php 

	/**
	* 析构方法
	*/
	class GoodBoy
	{
		public $name;
		
		function __construct()
		{
			echo "你好！！！{$this->name}";
			echo "<hr>";
		}

		function __destruct()
		{
			echo "再见！！！{$this->name}";
		}
	}

	$a = new GoodBoy();

	echo $a->name = "张思德";


 ?>